#!/usr/bin/env python
# -*- coding:utf-8 -*-
import requests
from bs4 import BeautifulSoup

r = requests.get('https://python123.io/ws/demo.html')
demo = r.text
soup = BeautifulSoup(demo, 'html.parser')
# print(soup.prettify())
print(soup.title)
tag = soup.a
tagParentName = tag.parent.name
attr = tag.attrs
str = tag.string

